
// DmViewerView.h : interface of the CDmViewerView class
//


#pragma once
#include <osg\ref_ptr>
#include<osg\Group>
using namespace osgViewer;
class COSGViewer;
class osgViewer::Viewer;

class CDmViewerView : public CView
{
protected: // create from serialization only
	CDmViewerView();
	DECLARE_DYNCREATE(CDmViewerView)

// Attributes
public:
	CDmViewerDoc* GetDocument() const;

// Operations
public:

private:
	osg::ref_ptr<osg::Group> m_Root;
	osg::ref_ptr<osg::Group> m_imgRoot;
	COSGViewer* m_pOsgViewer;
	Viewer* m_Viewer;

// Overrides
public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);

// Implementation
public:
	virtual ~CDmViewerView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	afx_msg void OnFilePrintPreview();
	afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
	DECLARE_MESSAGE_MAP()
public:
	virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
	virtual void OnInitialUpdate();
	afx_msg void OnDestroy();
protected:
	virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
};

#ifndef _DEBUG  // debug version in DmViewerView.cpp
inline CDmViewerDoc* CDmViewerView::GetDocument() const
   { return reinterpret_cast<CDmViewerDoc*>(m_pDocument); }
#endif

